package com.atgm.mall.gmmailproduct.controller;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailproduct.service.GameAttrGroupRelaService;
import com.atgm.mall.gmmailproduct.vo.resp.AttrGroupWithAttrVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("gmmallproduct/gameattrgrouprela")
public class GameAttrGroupRelaController {

    @Autowired
    private GameAttrGroupRelaService gameAttrGroupRelaService;

    @GetMapping("/attrInfo/{game_id}")
    public R getAttrInfo(@PathVariable("game_id") Long gameId) {
        List<AttrGroupWithAttrVo> list = gameAttrGroupRelaService.queryGameAttr(gameId);
        return R.ok().setData(list);
    }

}
